var userInfoModule = angular.module('UserInfoModule', []);
userInfoModule.controller('UserInfoCtrl', ['$scope', function($scope){
	$scope.userInfo={
		username:"pss",
		password:"123",
		autoLogin:true
	}
	$scope.getFormData=function(){
		console.log($scope.userInfo);
	}
	$scope.setFormData=function(){
		$scope.userInfo={
			username:"new pss",
			password:"new 123",
			autoLogin:false
		}
	}
	$scope.changeColor=function(){
		if($scope.color == undefined || $scope.color == 'green'){
			$scope.color = "red";
		}else if($scope.color == 'red'){
			$scope.color = "green";
		}

	}
	$scope.isred = true;
	$scope.isgreen = false;
	$scope.messageText = "red";
	$scope.ngchangeColor=function(){
		if($scope.isred == true){
			$scope.isgreen = true;
			$scope.isred = false;
			$scope.messageText = "green";
		}else{
			$scope.isgreen = false;
			$scope.isred = true;
			$scope.messageText = "red";
		}

	}
	$scope.menuState={show:false};
	$scope.toggleMenu=function(){
		$scope.menuState.show=!$scope.menuState.show;

	}
}])


